/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2022-10-21     xu           the first version
 */
#ifndef KEY_THREAD_INIT_H
#define KEY_THREAD_INIT_H

#include <stdint.h>
#include <rtthread.h>

enum {
    KEY_K1 = 1,
};

enum {
    STATE_PRESS_DOWN = 0,
    STATE_PRESS_UP,
    STATE_PRESS_REPEAT,
    STATE_SINGLE_CLICK,
    STATE_DOUBLE_CLICK,
    STATE_LONGPRESS_START,
    STATE_LONGPRESS_HOLD,
};

typedef struct {
    uint8_t key;
    uint8_t state;
} ui_key_msg_t;

rt_mq_t ui_key_mq_get();

#endif // KEY_THREAD_INIT_H